package com.healthcloud.service.impl;

import com.healthcloud.dao.losewisdom.LoseWisdomAdieDao;
import com.healthcloud.dto.req.losewisdom.LoseWisdomListReq;
import com.healthcloud.entity.losewisdom.LoseWisdomAdieEntity;
import com.healthcloud.service.losewisdom.LoseWisdomAdieService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import com.healthcloud.utils.PageParam;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;


@Service("loseWisdomAdieService")
@Transactional(rollbackFor = Exception.class)
public class LoseWisdomAdieServiceImpl implements LoseWisdomAdieService {

	@Autowired
	private LoseWisdomAdieDao loseWisdomAdieDao;
	
	@Override
	public LoseWisdomAdieEntity queryObject(Integer id){
		return loseWisdomAdieDao.queryObject(id);
	}
	
	@Override
	public List<LoseWisdomAdieEntity> queryList(LoseWisdomListReq bean, PageParam pageParam){
		return loseWisdomAdieDao.queryList(bean, pageParam);
	}
	
	@Override
	public int queryTotal(LoseWisdomListReq bean){
		return loseWisdomAdieDao.queryTotal(bean);
	}
	
	@Override
	public void save(LoseWisdomAdieEntity loseWisdomAdie){
		loseWisdomAdie.setCreateTime(new Date());
		loseWisdomAdieDao.save(loseWisdomAdie);
	}
	
	@Override
	public void update(LoseWisdomAdieEntity loseWisdomAdie){
		loseWisdomAdie.setUpdateTime(new Date());
		loseWisdomAdieDao.update(loseWisdomAdie);
	}
	
	@Override
	public void delete(Integer id){
		loseWisdomAdieDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		loseWisdomAdieDao.deleteBatch(ids);
	}
	
}
